--[[
    Author:             Arturo Aguilar Lagunas
    Description:        Dark theme for a single monitor (1920 x 1080)
]]

conky.config = {
    -- window
    alignment = 'top_left',
    gap_x = 0,
    gap_y = 0,
    minimum_height = 1080,
    minimum_width = 460,
    maximum_width = 460,
    background = false,
    border_width = 1,
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'desktop',
    -- Colors
    font = 'RobotoMono Nerd Font:size=11',
    font1 = 'RobotoMono Nerd Font:size=11',
    color1 = '#f3f3f3',                        -- accent
    color2 = '#c8c8c8',                        -- accent dimmed
    own_window_transparent = false,            -- transparency
    own_window_argb_visual = true,             -- transparency
    own_window_argb_value = 195,               -- transparency [0 -255]
    own_window_colour = '#121214',             -- bg color [comment to full transparency]
    default_color = 'white',                   -- default colors
    default_outline_color = 'white',           -- default colors
    default_shade_color = 'white',             -- default colors
    double_buffer = true,                      -- removes flickering
    draw_borders = false,                      -- borders (window)
    draw_graph_borders = true,                 -- borders (graphs)
    draw_outline = false,                      -- border (text)
    draw_shades = false,                       -- shades
    extra_newline = false,                     -- extra newline at the end when writing to stdout
    -- other
    update_interval = 1.0,
    cpu_avg_samples = 4,
    net_avg_samples = 4,
    no_buffers = true,
    out_to_console = false,
    out_to_ncurses = false,
    out_to_stderr = false,
    out_to_x = true,
    show_graph_range = false,
    show_graph_scale = false,
    stippled_borders = 0,
    uppercase = false,
    use_spacer = 'none',
    use_xft = true,
}

conky.text = [[
${voffset 30}
${goto 24}${color1}${font1} System ${voffset 8}${font}  
${goto 24}${color1}OS:        ${color2}$sysname $nodename $machine  ${alignr}${color1}  ${color2}${battery_percent BAT1}%  
${goto 24}${color1}Kernel:    ${color2}$kernel  
${goto 24}${color1}Uptime:    ${color2}$uptime  

${goto 24}${color1}${font1} File system ${voffset 8}${font}  
${goto 24}${color1}root:  ${color2}${fs_used /}/${fs_size /} ${alignr} ${fs_used_perc /}% ${color1}${fs_bar 6, 124 /}  

${goto 24}${color1}${font1} Processes ${voffset 8}${font}  
${goto 24}${color1}All: ${color2}$processes${alignr}${color1}Running: ${color2}$running_processes ${color1}Threads: ${color2}$running_threads  

${goto 24}${color1}${font1} Memory ${voffset 8}${font}  
${goto 24}${color1}RAM:  ${color2}$mem/$memmax ${alignr}$memperc% ${color1}${membar 4, 124}  
${goto 24}${color1}Swap: ${color2}$swap/$swapmax ${alignr}$swapperc% ${color1}${swapbar 4, 124}${voffset 8}  
${goto 24}${color1}${alignr}PID    CPU    MiB${voffset 8}  
${goto 24}${color1}缾  ${top_mem name 1}${color2}${alignr}${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}  
${goto 24}${color1}缾  ${top_mem name 2}${color2}${alignr}${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}  
${goto 24}${color1}缾  ${top_mem name 3}${color2}${alignr}${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}  
${goto 24}${color1}缾  ${top_mem name 4}${color2}${alignr}${top_mem pid 4} ${top_mem cpu 4} ${top_mem mem 4}  
${goto 24}${color1}缾  ${top_mem name 5}${color2}${alignr}${top_mem pid 5} ${top_mem cpu 5} ${top_mem mem 5}  
${goto 24}${color1}缾  ${top_mem name 6}${color2}${alignr}${top_mem pid 6} ${top_mem cpu 6} ${top_mem mem 6}  
${goto 24}${color1}缾  ${top_mem name 7}${color2}${alignr}${top_mem pid 7} ${top_mem cpu 7} ${top_mem mem 7}${voffset 8}  
${goto 24}${color1}${memgraph 30, 420}  

${goto 24}${color1}${font1} CPU ${voffset 8}${font}  
${goto 24}${color1}0: ${freq_g 1}GHz ${color2}${alignr}${cpu cpu0}% ${color1}${cpubar cpu0 4, 124}  
${goto 24}${color1}1: ${freq_g 2}GHz ${color2}${alignr}${cpu cpu1}% ${color1}${cpubar cpu1 4, 124}  
${goto 24}${color1}2: ${freq_g 3}GHz ${color2}${alignr}${cpu cpu2}% ${color1}${cpubar cpu2 4, 124}  
${goto 24}${color1}3: ${freq_g 4}GHz ${color2}${alignr}${cpu cpu3}% ${color1}${cpubar cpu3 4, 124}${voffset 8}  
${goto 24}${color1}${alignr}PID    MiB    CPU${voffset 8}  
${goto 24}${color1}  ${top name 1}${color2}${alignr}${top pid 1} ${top mem 1} ${top cpu 1}  
${goto 24}${color1}  ${top name 2}${color2}${alignr}${top pid 2} ${top mem 2} ${top cpu 2}  
${goto 24}${color1}  ${top name 3}${color2}${alignr}${top pid 3} ${top mem 3} ${top cpu 3}  
${goto 24}${color1}  ${top name 4}${color2}${alignr}${top pid 4} ${top mem 4} ${top cpu 4}  
${goto 24}${color1}  ${top name 5}${color2}${alignr}${top pid 5} ${top mem 5} ${top cpu 5}  
${goto 24}${color1}  ${top name 6}${color2}${alignr}${top pid 6} ${top mem 6} ${top cpu 6}  
${goto 24}${color1}  ${top name 7}${color2}${alignr}${top pid 7} ${top cpu 7} ${top mem 7}${voffset 8}  
${goto 24}${color1}${cpugraph 30, 420}  

${goto 24}${color1}${font1}說 Network: ${color2}${wireless_bitrate wlan0}${alignr}${color2}${wireless_link_qual_perc wlan0}% ${color1}${wireless_link_bar 4,124 wlan0}${voffset 8}${font}  
${goto 24}${color1}SSID: ${color2}${wireless_essid wlan0}${alignr}${color1}IP: ${color2}${addr wlan0}  
${goto 24}${color1}Total Up: ${color2}${totalup wlan0} ${alignr}${color1}Total Down: ${color2}${totaldown wlan0}  
${goto 24}${color1}Speed Up: ${color2}${upspeed wlan0} ${alignr}${color1}Speed Down: ${color2}${downspeed wlan0}${voffset 8}  
${goto 24}${color1}${upspeedgraph wlan0 30, 200} ${alignr}${downspeedgraph wlan0 30, 200}  
]]